//
//  BGWMPageViewController.m
//  bigMall
//
//  Created by ios on 16/7/19.
//  Copyright © 2016年 thinklev. All rights reserved.
//

#import "BGWMPageViewController.h"
#import "BGJiBenMessageViewController.h"
#import "BGSafeCenterViewController.h"
#import "BGRenZhengCenterViewController.h"

@interface BGWMPageViewController ()


@end

@implementation BGWMPageViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.title = @"安全认证";
    
    UIBarButtonItem *backIetm = [[UIBarButtonItem alloc] init];
    backIetm.title =@"";
    self.navigationItem.backBarButtonItem = backIetm;
    
}

- (NSArray <NSString *> *)titles {
    
    return @[@"基本信息",@"安全中心",@"认证信息"];
}

- (NSInteger)numbersOfChildControllersInPageController:(WMPageController *)pageController {
    
    self.menuItemWidth = self.view.frame.size.width / 3;
    self.menuViewStyle = WMMenuViewStyleLine;
    self.titleColorNormal = [UIColor blackColor];
    self.titleColorSelected = [UIColor orangeColor];
    self.titleSizeSelected = 16;
    self.titleSizeNormal = 16;
    self.showOnNavigationBar = NO;
    self.menuHeight = 50;
    self.progressColor = [UIColor orangeColor];
    self.scrollView.scrollEnabled = YES;
    
    return self.titles.count;
}

- (NSString *)pageController:(WMPageController *)pageController titleAtIndex:(NSInteger)index {
    
    return self.titles[index];
}

- (UIViewController *)initializeViewControllerAtIndex:(NSInteger)index {
    
    if (index == 0) {
        
        BGJiBenMessageViewController *a = [[BGJiBenMessageViewController alloc] init];
        
        return a;
        
    }else if (index == 1) {
        
        BGSafeCenterViewController *a = [[BGSafeCenterViewController alloc] init];
        
        return a;
        
    }else {
        
        BGRenZhengCenterViewController *a = [[BGRenZhengCenterViewController alloc] init];
        
        return a;
        
    }
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
